package net.osc.service.query;

import java.util.List;
import java.util.Map;

import net.osc.model.query.QuerySegment;
import net.osc.model.query.QueryUnit;
import net.osc.util.PageBean;

public interface CommonQueryManager {

	public void saveQueryUnit(QueryUnit queryUnit);

	public void saveQuerySegment(QuerySegment querySegment);

	public void delQueryUnits(Long[] ids);

	public void delQuerySegments(Long[] ids);

	public QueryUnit getQuery(String key);

	public <T> List<T> doQuery(String key, Map<String, Object> paramMap);

	public <T> List<T> doQuery(QueryUnit queryUnit, Map<String, Object> paramMap);

	public <T> PageBean<T> doPageQuery(String key, Map<String, Object> paramMap,
			PageBean<T> pageBean);

	public <T> PageBean<T> doPageQuery(QueryUnit queryUnit, Map<String, Object> paramMap,
			PageBean<T> pageBean);
}
